/* indent size: 2 */

module.exports = app => {
    const DataTypes = app.Sequelize;
  
    const Admins = app.model.define('admins', {
      id: {
        type: DataTypes.INTEGER,
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        comment: "服装管理员id",
      },
      nickName: {
        type: DataTypes.STRING,
        allowNull: true,
        comment: "管理员昵称",
      },
      avatar: {
        type: DataTypes.STRING,
        allowNull: true,
        comment: "管理员头像",
      },
      adminName: {
        type: DataTypes.STRING,
        allowNull: true,
        comment: "管理员账号",
      },
      adminPassword: {
        type: DataTypes.STRING,
        allowNull: true,
        comment: "管理员密码",
      }, 
      limit: {
        type: DataTypes.INTEGER,
        allowNull: true,
        comment: "管理员权限【0-超级管理员；1-普通管理员】",
      },
      token: {
        type: DataTypes.STRING,
        allowNull: true,
        comment: "管理员token",
      },
      status: {
        type: DataTypes.INTEGER,
        allowNull: true,
        defaultValue: 1,
        comment: "管理员状态【1-正常；0-禁用】",
      },
      remarks: {
        type: DataTypes.STRING,
        allowNull: true,
        comment: "管理员账号状态备注",
      },
      createdAt: {
        type: DataTypes.DATE,
        allowNull: true,
        comment: "创建时间",
      },
      updatedAt: {
        type: DataTypes.DATE,
        allowNull: true,
        comment: "更新时间",
      },
    }, {
        tableName: 'admins'
    });
  
    Admins.associate = function() {
  
    }
  
    return Admins;
  };
  